package ${entityPackage};

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

<#--导包-->
<#list packages as package>
    import ${package};
</#list>
import java.io.Serializable;

/**
* <p>
    * ${comment!}
    * </p>
*
* @author ${author!"liuwb"}
* @since ${data!.now?datetime}
*/
@Data
@Accessors(chain = true)
@TableName("${tableName}")
@ApiModel(value = "${className?uncap_first}", description="${comment!}")
public class ${className} implements Serializable {

<#list properties as p>

    @ApiModelProperty(value = "<#if p.comment?? && p.comment!="">${p.comment}[${p.sqlType}]</#if>", required = ${p.isNull?string("false","true")})
    <#if p.isKey==true>
        @TableId(value = "${p.columnName}", type = <#if p.isAuto>IdType.AUTO<#else>IdType.ASSIGN_ID</#if>)
    <#else>
        @TableField(value = "${p.columnName}")
    </#if>
    <#if p.isIgnore==true>
        @JsonIgnore
    </#if>
    <#if p.isLogicDel==true>
        @TableLogic
    </#if>
    private ${p.javaType} ${p.name};
</#list>

}

